#include "Cell.h"


float Cell::width = sf::VideoMode::getDesktopMode().width/64;
float Cell::height = sf::VideoMode::getDesktopMode().height/48;

Cell::Cell():
	topPos(Position()),
	tCell(WALL)
{
	stBulletproof = false;
	stVision = true;
	stPassable = true;
	pSpeed = 1.0f;

}

Cell::Cell(Cell & cpCell)
{
	this->tCell = cpCell.tCell;
	this->stBulletproof = cpCell.stBulletproof;
	this->stVision = cpCell.stVision;
	this->stPassable = cpCell.stPassable;
	this->pSpeed = cpCell.pSpeed;
	this->topPos = cpCell.topPos;
}

Cell::Cell(cellType _cell, Position _topPos):
	topPos(_topPos),
	tCell(_cell)
{
	switch (tCell)
	{
	case ROAD: stBulletproof = false;
			   stVision = true;
			   stPassable = true;
			   pSpeed = 1.0f;			   
			break;
	case WALL: stBulletproof = true;
			   stVision = true;
			   stPassable = false;
			   pSpeed = 0.0f;
			break;
	case JUNGLE: stBulletproof = false;
			   stVision = false;
			   stPassable = true;
			   pSpeed = 0.4f;
			break;
	}
};

CellSize Cell::getSize()
{
	return CellSize(width,height);
}

Cell & Cell::operator=(const Cell & _rhs)
{
	return *this;
}

cellType Cell::getCellType() const
{
	return tCell;
}

Cell::~Cell(){};